<h2>[+lang.IM_title_add_new_category+]</h2>
[+view.message+]

<form name="form_add_new_category" action="index.php" method="post" enctype="multipart/form-data">
<input type="hidden" name="a" value="[+action_id+]" />
<input type="hidden" name="id" value="[+module_id+]" />
<input type="hidden" name="page" value="add_new_category" />
<table id="table3">
    <tr>
        <td class="col1">Category name <span class="asterik">*</span></td>
        <td class="col2"><input name="data[Category][name]" type="text" class="textfield" /></td>
    </tr>
    <tr>
        <td class="col1">Category parent <span class="asterik">*</span></td>
        <td class="col2">
            <select name="data[Category][parent_id]" class="dropdown">
                <option value="">None</option>
                [+select.categories+]
            </select>
        </td>
    </tr>
    <tr>
        <td class="col1">Image</td>
        <td class="col2">
            <input name="file[]" type="file" class="file" /> <a href="javascript:" onclick="$(this).parent().parent().remove();">Delele</a>
        </td>
    </tr>
    <tr>
        <td class="col1"></td>
        <td class="col2"><a id="add-image-link" href="javascript:">Add another image</a></td>
    </tr>
    <script type="text/javascript">
    var image_count = 0;
    $(document).ready(function() {
        $('#add-image-link').click(function(){
            image_count++
           $(this).parent().parent().before('<tr><td class="col1">Image ' + image_count + '</td><td class="col2"><input name="file[]" type="file" class="file" /> <a href="javascript:" onclick="$(this).parent().parent().remove();">Delele</a></td></tr>');
        });
    });
    </script>
    <tr>
        <td class="col1">&nbsp;</td>
        <td class="col2">
            <input name="" class="button" type="submit" value="OK" />
            <input name="" class="button" type="button" value="Cancel" />
        </td>
    </tr>
</table>
</form>